package com.kotasoft.iip.processor;

import java.util.Calendar;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.kotasoft.iip.model.insurance.Order;

public class ValorizationOrder implements Processor {

	private static final Logger LOG = LoggerFactory.getLogger(ValorizationOrder.class);

	public void process(Exchange exchange) throws Exception {
		Order order = exchange.getIn().getMandatoryBody(Order.class);
		LOG.debug("Valorizando orden {}", order);
		order.setValued(Calendar.getInstance().getTime());
	}

}
